package model;

import java.util.Collections;
import java.util.List;

/**
 * @author tyy
 * @param <T>
 */
public class Column<T extends Comparable<T>> {
    private String myDataTableName;
    private String myColumnName;
    private List<T> myContent;
    /**
     * Creates a new column
     * @param tableName name of the data table the column belongs to
     * @param columnName name of the column
     * @param content the content of the column
     */
    public Column(String tableName, String columnName, List<T> content) {
        myDataTableName = tableName;
        myColumnName = columnName;
        myContent = content;
    }
    /**
     * 
     * @return Returns the name of the DataTable from where this column was created
     */
    public String getDataTableName() {
        return myDataTableName;
    }
    /**
     * 
     * @return Returns the name of the Column
     */
    public String getColumnName() {
        return myColumnName;
    }
    /**
     * 
     * @return Returns an unmodifiable list of values in the Column
     */
    public List<T> getContents() {
        return Collections.unmodifiableList(myContent);
    }
}
